def fun(i,cnt):
    if i==0:
        return
    print i%10,
    i/=10
    cnt+=1
    fun(i,cnt)

i = int(raw_input('Input number:'))
fun(i,0)